var modGridSample_locLang=new localLang("modGridSample");
var modGridSample= new Class({
    Extends:WFWindow,
    sampleProxyEnable: true,
    options: {
        name: 'modGridSample',
        title: modGridSample_locLang.label('title'),
        btnSettings: true,
        btnRefresh: true,
        btnHelp: true,
        btnClose: true,
        loadCSS: true,
        supportServerTypes:['modSimple'],
        defaultWidgetHeight: 244
    },
    renderContent: function(){
        var wid = this.id;
        this.pane = new Element('div',{'class':'pane-grid'}).inject(this.boxBD);
        this.grid = new Element('div',{'id':'myGrid_'+wid,'class':'trend-grid'}).inject(this.pane);

        var data = [],i;
        for (i = 0; i < 50000; i++) {
            data.push({
                NAME: '(01)1_C' + i,
                IP: '174.184.227.166',
                GUID: '22220000-0000-0000-0000-00000000000' + i,
                CONNETCIONS: 'online'
            });
        }

        (function($) {
            $(function() {
                $('#myGrid_'+wid).trendGrid({
                    columns: [
                        {
                            id: "NAME",
                            name: 'Name',
                            width: 180,
                            sortAsc: true},
                        {
                            id: "IP",
                            name: "IP Address",
                            width: 140},
                        {
                            id: "CONNETCIONS",
                            name: "Connection",
                            width: 100},
                        {
                            id: "GUID",
                            name: "GUID",
                            width: 200
                        }
                    ],
                    data: data,
                    rowRecords: data.length
                });
            })
        })(jQuery);
        window.fireEvent('widget_load', this.widgetInfo);
    },
    onClickRefresh2: function(){
    },
    displayChart:function(){
    },
    displaySuccess: function(response){
    },
    displayFailure: function(){
    },
    onContentresize: function(event){
    },
    refreshMod:function(){
    }
});
